<template>
	<view>
		<!-- 		<view style="width: 100%; ">
			<u--image src="/static/bg_login.png" ></u--image>
		</view> -->
		<!-- <u--text color="red" text="注:提现请输入支付宝或者注册微信手机号" :bold="true" customStyle="margin: 50px 0px 0px 50rpx"></u--text> -->
		
		<u--text text="修改昵称" :bold="true" customStyle="margin: 50px 0px 0px 50rpx"></u--text>
		<u--input v-model="nameValue" customStyle="margin: 10px 50px 0px 50rpx" placeholder="请输入要修改的昵称" border="bottom"
			clearable>
		</u--input>
<!-- 
		<u--text text="支付收款宝账号" :bold="true" customStyle="margin: 30px 0px 0px 50rpx"></u--text>
		<u--input v-model="zfbValue" customStyle="margin: 10px 50px 0px 50rpx" placeholder="支付收款宝账号" border="bottom"
			clearable>
		</u--input>
		
		
		<u--text text="微信收款账号" :bold="true" customStyle="margin: 30px 0px 0px 50rpx"></u--text>
		<u--input v-model="wxValue" customStyle="margin: 10px 50px 0px 50rpx" placeholder="请输入微信收款账号" border="bottom"
			clearable>
		</u--input> -->

		<view>
			<u-button class="custom-style" type="primary" text="保存" @click="clickLogin"></u-button>
		</view>
		<view v-if="0">
			<u-button class="custom-style-register" type="info" text="前去注册" @click="clickRegister"></u-button>
		</view>

		

	</view>
</template>

<script>
	export default {
		data() {
			return {
				nameValue: '',
				zfbValue: '',
				wxValue: '',
			}
		},
		methods: {
			clickLogin() {
				let param = {
					userName: this.nameValue,
				}
				this.$u.api.apiUpdateUser(param).then(res => {
					if (res.code == 1) {
						console.log("onLoad=" + res.data)
						this.$u.toast("修改成功!")
						//返回上一页
					} else {
						this.$u.toast(res.msg)
					}
				})
			},
			
		}
	}
</script>

<style lang="scss" scoped>
	.custom-style {
		width: 80%;
		margin-top: 100rpx;
	}

	.custom-style-register {
		width: 80%;
		margin-top: 50rpx;
	}
</style>